<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript">
var APP = '<?php echo __APP__?>';
var PUBLIC = '<?php echo __PUBLIC__ ?>';
</script>
<script type="text/javascript" src="./jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="./wish/js/index.js"></script>
<link rel="stylesheet" href="./wish/css/index.css">
	
<script type="text/javascript">
$(function(){
	$('form').submit(function(){
		//抓取form表单的所有内容，不用挨个抓取
		var formData = $("#form form").serialize();
		//发送异步
		$.ajax({
			type:"post",
			url:"index.php?c=Arc&a=add",
			data:formData,
			dataType:'json',
			success:function(phpData){
             var str='"<div class="box_ge" style="position: absolute;left:250px;top:399px;background: url(./wish/pic/xw.png);">
			  <p class="name">'+phpData.name+'</p>
			  <p class="box_nei">'+phpData.value+'</p>
		      </div>';


		     $('#box .box_ge:last').after(str);
			}			
		});
		//阻止表单提交
		return false;
	})
})
</script>
</head>
<body>
	<img src="./wish/pic/hei.png" alt="" id="hei">         
	<div id="show">我要许愿</div>
	<div id="head">取消</div>



	<div id="form"  class="">		
		<form action="" method="post" class="form" style="background: url(./wish/pic/w.jpg);" >		
			<img src="./pic/z.png" alt="" id="png">
			呢称：<input type="text" name="name" class="neche">
			内容：<input type="text" name="value" class="neiron">
			<input type="submit" id="submit" class="submit" value="许愿">
			<!-- <img src="./wish/pic/ss.jpg" alt="" id="ss"> -->
		</form>			
	</div>
	<div id="box">
	     <?php foreach($data as $k => $v ){ ?>				
	     <div class="box_ge" style="position: absolute;left:250px;top:399px;background: url(./wish/pic/xw.png);">
			<p class="name"><?php echo $v['name'] ?></p>
			<p class="box_nei"><?php echo $v['value'] ?></p>
		</div>
        <?php } ?>
		<div class="img"><img src="./wish/pic/7.jpg" alt="" id="img" style="" >
		</div>

	</div>
	<div class="shownei" style="background:url(./wish/pic/r.png) no-repeat -50px -50px;">
		<p class="showtop"></p>
		<p class="showleft"></p>
	</div>
</body>



</html>
